package Final;

import java.util.*;

public class test11 {
    public static void main(String[] args) {
        String[] strs = {"12345","67891","12347809931","98765432102","67891","12347809933"};
        StringList sl=new StringList();
        LinkedList<String> qqList=sl.constructList(strs);
        System.out.println(sl.search(qqList));
    }
}

/* 请在这里填写答案：StringList类 */
class StringList{

    public LinkedList<String> constructList(String[] strs) {
        LinkedList<String> list = new LinkedList<>();
        list.addAll(Arrays.asList(strs));
        return list;
    }

    public String search(LinkedList<String> qqList) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        for (String s : qqList) {
            if (s.length() == length) {
                return s;
            }
        }
        return "not exist";
    }
}